import { createRouter, createWebHistory } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    component: () => import('@/views/main/index.vue'),
    redirect: '/home',
    children: [{
      path: '/home',
      name: 'home',
      component: () => import('@/views/home/index.vue'),
    },
    {
      path: '/mine',
      name: 'mine',
      component: () => import('@/views/mine/index.vue'),
    }
  ]
  },
  {
    path: '/reservation-server',
    component: () => import('@/views/reservation/ReservationServer.vue'),
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes,
})

export default router
